﻿using System;
using System.Collections.Generic;
using System.Windows.Ink;

namespace ThePresenter.Net.PresenterCom.Uids
{
	[Serializable]
	public class UidStrokesCollection : Dictionary<Uid, Stroke>
	{
	}

	public static class StrokeCollectionExtension
	{
		/// <summary>
		/// Gets the dictionary with strokes identified by theirs uid.
		/// </summary>
		/// <param name="strokes">The strokes.</param>
		/// <param name="uidGuid">The uid GUID.</param>
		/// <returns></returns>
		public static UidStrokesCollection GetUidedStrokeCollection(this StrokeCollection strokes)
		{
			UidStrokesCollection USC = new UidStrokesCollection();
			foreach (Stroke s in strokes)
			{
				USC.Add(s.GetUid(), s);
			}
			return USC;
		}
	}
}
